<!-- 欢迎面板 -->
{% if request.user.is_anonymous %}
    <div class="side-right-header">
        <span class="center-block text-center h3">博客系统</span>
        <span class="center-block text-center text-muted">DEMO演示版</span>
        <span class="center-block text-center text-muted">测试账号:test 密码:123456</span>
        <a href="#" data-toggle="modal" data-target=".login-modal" class="auth">
            <span class="btn btn-default center-block text-center btn-login">登录</span>
        </a>
    </div>
{% else %}
    <div class="side-right-header">
        <a href="/{{ request.user.username }}/" class="avatar">
            <img src="/media/{{ request.user.avatar }}" class="center-block text-center">
        </a>
        <a href="/{{ request.user.username }}/">
            <span class="btn btn-default center-block text-center btn-login">我的个人站点</span>
        </a>
    </div>
{% endif %}
<br>
<!-- 排行榜 -->
<ul class="nav nav-tabs" role="tablist">
    <li role="presentation" class="active">
        <a href="#article_list_hot" aria-controls="home" role="tab" data-toggle="tab">文章推荐</a>
    </li>
    <li role="presentation">
        <a href="#article_list_view" aria-controls="profile" role="tab" data-toggle="tab">阅读排行</a>
    </li>
</ul>
<!-- 排行榜：Tab panes -->
<div class="tab-content">
    <div role="tabpanel" class="tab-pane active" id="article_list_hot">
        {% for article in article_list_hot %}
            <div class="article-item-right clearfix">
                <div class="view-title small">
                    <span class="text-danger h4">{{ forloop.counter }}. </span>
                    <a href="/{{ article.user.username }}/articles/{{ article.id }}" class="title">
                        {{ article.title }}
                    </a>
                    <a href="/{{ article.user }}/" class="avatar">
                        <img src="/media/{{ article.user.avatar }}">
                    </a>
                </div>
            </div>
        {% endfor %}
    </div>
    <div role="tabpanel" class="tab-pane" id="article_list_view">
        {% for article in article_list_view %}
            <div class="article-item-right clearfix">
                <div class="view-title small">
                    <span class="text-danger h4">{{ forloop.counter }}. </span>
                    <a href="/{{ article.user.username }}/articles/{{ article.id }}" class="title">
                        {{ article.title }}
                    </a>
                    <a href="/{{ article.user }}/" class="avatar">
                        <img src="/media/{{ article.user.avatar }}">
                    </a>
                </div>
            </div>
        {% endfor %}
    </div>
</div>